package com.kyl.service.impl;


import com.kyl.entity.Bed;
import com.kyl.mapper.BedMapper;
import com.kyl.service.BedService;
import com.kyl.utils.BeanConv;
import com.kyl.vo.BedVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author WanJl
 * @version 1.0
 * @title BedServiceImpl
 * @description
 * @create 2025/1/18
 */
@Service
public class BedServiceImpl implements BedService {
    @Resource
    private BedMapper beanMapper;
    @Override
    public List<BedVo> getBedsByRoomId(Long roomId) {
        List<Bed> bedList = beanMapper.getBedsByRoomId(roomId);
        return BeanConv.toBeanList(bedList,BedVo.class);
    }
}
